<?php
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
include 'includes/viewitem.php';

?>

<?php if(($cf_video_display)==1):?>
<div id="itemVideo">
<?php echo $this->loadTemplate('itemvideo');?>
</div>
<?php endif;?>
<?php if ($params->get('show_hits') || $params->get('show_modify_date')) : ?>
<div class="itemSubInfo">	
    <?php if ($params->get('show_modify_date')) : ?>
	<span class="itemEdit fR"><?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date',$this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?></span>    
	<?php endif; ?>
    <?php if ($params->get('show_hits')) : ?>
	<span class="itemHits"><?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?></span>
    <?php endif;?>	
</div>
<?php endif; ?>
<?php if($customdata->get('cf_text_display',1)):?>
<div class="itemBody">
	<?php if (isset ($this->item->toc)) : ?>
		<div class="itemToc"><?php echo $this->item->toc; ?></div>
	<?php endif; ?>
    
    <?php if($customdata->get('cf_sapo_display') && $sapo && JRequest::getInt('start')==0 ) :?>
	<div class="itemSapo">
    	<p><?php echo $sapo;?></p>
    </div>
    <?php endif;?>      
    <div class="itemText">
    	<?php echo $this->item->event->beforeDisplayContent; ?>
			<?php echo $this->item->text; ?>
        <?php echo $this->item->event->afterDisplayContent; ?> 
	</div>    
</div>
<?php endif;?>
<?php if($customdata->get('cf_tags_display') !=0) :?>
<div class="itemTags">	
	<?php for($i=0; $i<sizeof($tags); $i++) { ;?>
			<span><?php if($customdata->get('cf_tags_display')==2):?>
            	<a href="#"><?php echo $tags[$i];?></a>
            	<?php else :?>   
                <?php echo $tags[$i];?>
                <?php endif;?> 
            </span>
		<?php };?>
</div>
<?php endif;?>

<?php if($backtotop_display):?>
<div class="itemBack">
	<a href="#anchorItem<?php echo JRequest::getInt('id'); ?>">Back to top</a>
</div>
<?php endif;?>

